// 领导首页
<template>
  <div class="box">
    <H2 style="text-align: center">2025XXX行动</H2>
    <el-button type="primary" @click="">保存</el-button>
    <el-button type="primary" @click="">下发</el-button>
    <el-form :model="form" ref="form" :rules="rules" label-width="80px" :inline="false" size="normal">
      <el-row :gutter="20">
        <el-col :span="6" :offset="0">
          <el-form-item label="督办编号:">{{ form.code }} </el-form-item>
        </el-col>
        <el-col :span="6" :offset="0">
          <el-form-item label="级别:">{{ form.level }} </el-form-item>
        </el-col>
        <el-col :span="6" :offset="0">
          <el-form-item label="来源:">{{ form.source }} </el-form-item>
        </el-col>
        <el-col :span="6" :offset="0">
          <el-form-item label="创建人:">{{ form.created }} </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="6" :offset="0">
          <el-form-item label="分类:">{{ form.class }} </el-form-item>
        </el-col>
        <el-col :span="6" :offset="0">
          <el-form-item label="任务标题:">{{ form.name }} </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="12" :offset="0">
          <el-form-item label="具体任务:">
            <el-input
              type="textarea"
              :autosize="{ minRows: 2, maxRows: 4 }"
              placeholder="请输入内容"
              v-model="form.content1"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" :offset="0">
          <el-form-item label="工作举措:">
            <el-input
              type="textarea"
              :autosize="{ minRows: 2, maxRows: 4 }"
              placeholder="请输入内容"
              v-model="form.content2"
            >
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row :gutter="20">
        <el-col :span="12" :offset="0">
          <el-form-item label="完成标准:">
            <el-input
              type="textarea"
              :autosize="{ minRows: 2, maxRows: 4 }"
              placeholder="请输入内容"
              v-model="form.content3"
            >
            </el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12" :offset="0">
          <el-form-item label="备注:">
            <el-input
              type="textarea"
              :autosize="{ minRows: 2, maxRows: 4 }"
              placeholder="请输入内容"
              v-model="form.content4"
            >
            </el-input>
          </el-form-item>
        </el-col>
      </el-row>

      <h3>
        <span>成果与限制时间</span>
      </h3>
      <div>
        <el-table :data="tableData" border stripe style="width: 100%">
          <el-table-column prop="name" label="预期标志性成果" />
          <el-table-column prop="date" align="center" label="完成时间" width="180" />
        </el-table>
      </div>

      <h3>
        <span>任务拆分 <el-button type="primary" @click="addTable">添加行</el-button></span>
      </h3>

      <div>
        <el-table :data="tableData2" border stripe style="width: 100%">
          <el-table-column label="操作" width="120px" align="center">
            <template slot-scope="scope">
              <el-button type="danger" @click="delTable(scope.row, scope.$index)">删除</el-button>
            </template>
          </el-table-column>
          <el-table-column prop="name" label="任务描述">
            <template slot-scope="scope">
              <el-input
                type="textarea"
                :autosize="{ minRows: 1, maxRows: 4 }"
                placeholder="请输入内容"
                v-model="scope.row.name"
              />
            </template>
          </el-table-column>
          <el-table-column prop="date" align="center" label="完成时间" width="240">
            <template slot-scope="scope">
              <el-date-picker v-model="scope.row.date" type="date" placeholder="选择日期" />
            </template>
          </el-table-column>
          <el-table-column prop="cust" align="center" label="人员选择" width="120">
            <template slot-scope="scope">
              <el-button type="warning">选择</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        code: '2025-DB-001',
        level: '集团级',
        source: '其他',
        created: '其他',
        class: '定方向',
        name: '1.深入谋划“十五五”发展规划',
        content1: `深入子公司走访调研，进一步把握相关业务的产业政策、市场形势、发展趋势，并结合上级部署要求和集团功能定位、主责主业和拟培育方向，提出集团“十五五”时期战略定位、主攻方向、发展目标、主要路径等，编制集团公司“十五五”规划指引`,
        content2: `1.指导各子公司开展“十五五”规划前期分析，通过开展行业内外走访调研等方式，切实把握好各业务产业政策、市场形势、发展趋势。
2.组织各子公司开展“十五五”规划思路研究，结合产业发展形势分析情况，提出本企业“十五五”时期战略思路、发展目标等。
3.根据国资委“十五五”规划编制有关安排和集团公司战略发展相关部署，结合各子公司“十五五”规划编制思路，综合分析、深入论证，初步明确集团“十五五”时期战略定位、主攻方向、发展目标、主要路径等，研究提出集团“十五五”规划编制指引。`,
        content3: `1.各子公司初步明晰本企业“十五五”发展思路
2.集团初步明确“十五五”发展思路`,
        content4: ``
      },
      tableData: [
        { name: '1.集团“十五五”发展初步思路', date: '2025-03-05' },
        { name: '2.集团“十五五”规划总体框架', date: '2025-06-05' },
        { name: '3.集团“十五五”发展总体规划', date: '2025-10-05' }
      ],
      tableData2: [
        { name: '1.集团“十五五”发展初步思路', date: '2025-03-05' },
        { name: '2.集团“十五五”规划总体框架', date: '2025-06-05' }
      ]
    }
  },
  methods: {
    addTable() {
      this.tableData2.push({})
    },
    delTable(data, index) {
      this.tableData2.splice(index, 1)
    }
  }
}
</script>

<style scoped>
.box {
  padding: 20px;
  background-color: #fdfbf2;
  position: relative;
}

.el-card {
  background-color: transparent;
}

.box >>> .el-table,
.el-table__expanded-cell {
  background-color: transparent;
  /* border: 1px solid #000; */
}

.box >>> .el-table th {
  background-color: transparent !important;
  /* border: 1px solid #000; */
}
.box >>> .el-table tr {
  background-color: transparent !important;
  /* border: 1px solid #000; */
}
.box >>> .el-table--enable-row-transition .el-table__body td,
.el-table .cell {
  background-color: transparent;
  /* border: 1px solid #000; */
}

#todo-col {
  padding: 0 20px 20px 0;
}
#Fill-col {
  padding: 10px 20px 0 0;
}
#todo-task {
  padding: 0 20px 20px 0;
}
#Fill-Echart {
  padding: 10px 20px 0 0;
}

.task-card {
  overflow: auto;
  height: 310px;
}
.task-div {
  padding-bottom: 15px;
}
.showProgressColor >>> .el-progress-bar__inner {
  background: linear-gradient(to right, blue, pink);
}
.box >>> .el-link {
  border-bottom: 1px solid #13ce66;
}
.red {
  background: lightyellow;
}
</style>
